﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加会员资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="__STATIC__heiseshop_admin/style/adminStyle.css" rel="stylesheet" type="text/css" />
<script src="__STATIC__heiseshop_admin/js/jquery.js"></script>
</head>
<style>
  .textBox{
    float: left;
  }
  .houzui{
    float: left;
  }
</style>
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i class="edit_user"></i><em>添加会员资料</em></span>
  </div>
  <form action="{:url('user_add')}" method="post">
  <table class="list-style">
    <tr>
      <td style="text-align:right;">年龄：</td>
      <td><input type="text" class="textBox length-middle" autocomplete="off"  name="age"/><span class="houzui" style="display:none">年龄必须是数字</span></td>
    </tr>
    <tr>
      <td style="text-align:right;">用户名：</td>
      <td><input type="text" class="textBox length-middle" autocomplete="off"  name="user" /><span class="houzui" style="display:none">用户名只能由汉字、字母和数字组成</span></td>
    </tr>
    <tr>
      <td style="text-align:right;">密 码：</td>
      <td><input type="password" class="textBox length-middle" autocomplete="off"  name="pwd" /><span class="houzui" style="display:none">密码不能为空</span></td>
    </tr>
   <tr>
    <td style="width:15%;text-align:right;">会员昵称：</td>
    <td><input type="text" class="textBox length-middle" autocomplete="off"  name="nickname" /><span class="houzui" style="display:none">昵称只能由汉字、字母和数字组成</span></td>
   </tr>
   <tr>
    <td style="text-align:right;">电子邮件：</td>
    <td><input type="text" class="textBox length-middle" autocomplete="off"  name="email" /><span class="houzui" style="display:none">email得符合email格式</span></td>
   </tr>
   <tr>
    <td style="text-align:right;">手机号码：</td>
    <td><input type="text" class="textBox length-middle" autocomplete="off"  name="phone" /><span class="houzui" style="display:none">手机长度必须是11位数字</span></td>
   </tr>
   <tr>
    <td style="text-align:right;">会员等级：</td>
    <td>
     <select class="textBox" name="group">
      {foreach name="group" id="value"}       
      <option value="{$value.id}" >{$value.name}</option>
      {/foreach}
     </select>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;"></td>
    <td><input type="submit" class="tdBtn" value="提交"/></td>
   </tr>
  </table>
</form>
 </div>
</body>
</html>
<script>
  $('.length-middle').focus(function(){
    $('.houzui').each(function(i){
      $(this).css('display','block')
    })
  })
  $('.length-middle').blur(function(){
    $('.houzui').each(function(i){
      $(this).css('display','none')
    })
  })
</script>